﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $fulse;

	function __construct($fulse)
	{
		$this->fulse      = $fulse;
	}
}
$rert32=mysql_query("select *from user where  userid ='".$_REQUEST[uid]."'");
$rowf2=mysql_fetch_array($rert32);
$rert30=mysql_query("select *from goodsorders where  ordersid ='".$_REQUEST[ordersid]."'");
$rowf=mysql_fetch_array($rert30);
$flag=true;
 	


$rert33=mysql_query("select *from car where  ordersid ='".$rowf[ordersid]."'");

while ($rowf3=mysql_fetch_array($rert33)) {

	$prize = array();
	
   
 

 
$date=date("Y-m-d H:i:s");
	$str = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $_REQUEST['content']);//转义表情 （输入法表情输入时使用）
	$zhuan=addslashes($str);//转义
	$str = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $_REQUEST['miaoshu']);//转义表情 （输入法表情输入时使用）
	$miaoshu=addslashes($str);//转义
	$str = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $_REQUEST['fuwu']);//转义表情 （输入法表情输入时使用）
	$fuwu=addslashes($str);//转义
	$str = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $_REQUEST['wuliu']);//转义表情 （输入法表情输入时使用）
	$wuliu=addslashes($str);//转义
$srat=mysql_query("INSERT INTO goodsreply(goodsid,content,userid,depict,service,logis,addtime,shopid,name,images) VALUES ('$rowf3[goodsid]','$zhuan','$_REQUEST[uid]','$miaoshu','$fuwu','$wuliu','$date','$rowf[shopid]','$rowf2[niname]','$_REQUEST[tu]')");

	$state=5;

   $srat1=mysql_query("update goodsorders set state='".$state."' where ordersid='".$_REQUEST[ordersid]."'");

	// 调用信息推送接口
	$url = "http://120.24.0.10/xzpf/api/jpush/jpush.php?state=".$state."&ordersid=".$_REQUEST[ordersid];
	file_get_contents($url);
	// 调用信息推送接口 end
   
   if ($srat!=true) {
   	$flag=false;
   }

 }
	if($flag==true)
	{
		$der=100;
	}	

$prize[] = new MyPrizeBean($der);
echo json_encode($prize);


?>